package com.mfangsoft.zhuangjialong.app.weixin.mapper;

import java.util.List;
import java.util.Map;

import com.mfangsoft.zhuangjialong.common.utils.stereotype.WriterRepository;
import com.mfangsoft.zhuangjialong.integration.region.model.RegionEntity;

@WriterRepository
public interface WeiXinMapper {
	Map<String, Object> selectCustomerByOpenid(String openid);

	Integer selectShopBySellerId(Integer sellerId);

	Integer addCustomer(Map<String, Object> map);

	void addCustomerSeller(Map<String, Object> map);

	void updateCustomer(Map<String, Object> map);

	Integer selectCustomerNumByPhone(String phone);

	Integer selectSeller(Map<String, Object> map);

	Integer selectCustomerSeller(Integer customerId);

	void updateCustomerSeller(Map<String, Object> map);

	Integer selectRelation(Integer customerId);

	Map<String, Object> selectCustomerById(Integer customerId);

	Integer selectFilialeIdByNode2(Integer shopId);

	List<String> selectFilialeIdByAddress(String address);

	/**
	 * 查询所有
	 * 
	 * @return
	 */
	List<RegionEntity> select();

	/**
	 * 查询城市
	 * 
	 * @param code
	 * @return
	 */
	List<RegionEntity> selectCity(String code);

	/**
	 * 查询区县
	 * 
	 * @param code
	 * @return
	 */
	List<RegionEntity> selectCounty(String code);

	Integer selectSellerCustomerCount(Integer sellerId);

	Integer selectWXCustomerNumByPhone(String string);
	
	Map<String,Object> selectCustomerByPhone(String phone);
	
	void deleteCustomerById(Integer id);
}
